function(tensor_test name)
    add_executable(${name} ${name}.cpp)
    link_tensor(${name})
    install(TARGETS ${name}
        RUNTIME DESTINATION tests)
endfunction()

set_test_c_cxx_flags()

tensor_test(test_activation)
tensor_test(test_argmax)
tensor_test(test_attention)
tensor_test(test_check)
tensor_test(test_clip)
tensor_test(test_concat)
tensor_test(test_convolution)
tensor_test(test_deconvolution)
tensor_test(test_depthwise_convolution)
tensor_test(test_dilated_convolution)
tensor_test(test_detectionoutput)
tensor_test(test_eltwise)
tensor_test(test_fully_connected)
tensor_test(test_rnn)
tensor_test(test_power)
tensor_test(test_reduction)
tensor_test(test_pooling)
tensor_test(test_pooling_bp)
tensor_test(test_padding)
tensor_test(test_priorbox)
tensor_test(test_reshape)
tensor_test(test_softmax)
tensor_test(test_split)
tensor_test(test_slice)
tensor_test(test_scale)
tensor_test(test_transpose)
tensor_test(test_non_max_suppression)
tensor_test(test_roialign)
tensor_test(test_l2normalization)
tensor_test(test_prelu)
tensor_test(test_normalization) 
tensor_test(test_tile) 

tensor_test(test_convolution_int8)
tensor_test(test_depthwise_convolution_int8)
tensor_test(test_concat_int8)
tensor_test(test_pooling_int8)
tensor_test(test_convolution_bnn)

if (USE_MALI)
    if (USE_FP16)
        tensor_test(test_convolution_ocl test_convolution_ocl.cpp)
        tensor_test(test_deconvolution_ocl test_deconvolution_ocl.cpp)
        tensor_test(test_channel_resize_ocl test_channel_resize_ocl.cpp)
        tensor_test(test_depthwise_convolution_ocl test_depthwise_convolution_ocl.cpp)
        tensor_test(test_depthwise_pointwise_convolution_ocl test_depthwise_pointwise_convolution_ocl.cpp)
        tensor_test(test_fully_connected_ocl test_fully_connected_ocl.cpp)
        tensor_test(test_multihead_attention_ocl test_multihead_attention_ocl.cpp)
        tensor_test(test_padding_ocl test_padding_ocl.cpp)
        tensor_test(test_prelu_ocl test_prelu_ocl.cpp)
        tensor_test(test_pooling_ocl test_pooling_ocl.cpp)
        tensor_test(test_softmax_h1w1_ocl test_softmax_h1w1_ocl.cpp)
        tensor_test(test_power_ocl test_power_ocl.cpp)
        tensor_test(test_transpose_ocl test_transpose_ocl.cpp)
        tensor_test(test_concat_ocl test_concat_ocl.cpp)
        tensor_test(test_reshape_ocl test_reshape_ocl.cpp)
    endif (USE_FP16)
endif (USE_MALI)
